home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / expect-5.16 / INSTALL < prev    next >
Encoding:
Text File  |  1995-07-14  |  7.7 KB  |  203 lines

  1. This file is INSTALL.  It contains installation instructions for Expect.
  2.  
  3. If you do not have Tcl, get it (Expect's README explains how) and
  4. install it.  The rest of these instructions assume that you have Tcl
  5. installed.
  6.  
  7. If you are installing Expect on a single architecture, or are just
  8. trying it out to see whether it is worth installing, follow the
  9. "Simple Installation" below.  If you are installing Expect on multiple
  10. architectures or the "Simple Installation" instructions are not
  11. sufficient, see "Sophisticated Installations" below.
  12.  
  13. --------------------
  14. Permissions
  15. --------------------
  16.  
  17. On a Cray, you must be root to compile Expect.  (See the FAQ for why
  18. this is.)  On all other systems, you do not have to be root.
  19.  
  20. --------------------
  21. Simple Installation
  22. --------------------
  23.  
  24. By default, the Tcl source directory is assumed to be in the same
  25. directory as the Expect source directory.  For example, in this
  26. listing, Expect and Tcl are both stored in /usr/local/src.
  27.  
  28.     /usr/local/src/tcl7.3        (actual version may be different)
  29.     /usr/local/src/expect-5.4    (actual version may be different)
  30.  
  31. If Tcl is stored elsewhere, create a symbolic link to its real
  32. directory.  For example, from the Expect directory, type:
  33.  
  34.     ln -s /some/where/else/src/tcl7.3 ..
  35.  
  36. The same applies for Tk, if you have it.  (Tk is optional.)
  37.  
  38. Run "./configure".  This will generate a Makefile (from a prototype
  39. called "Makefile.in") appropriate to your system.  (Note that this one
  40. step must be done in the foreground because configure performs various
  41. tests on your controlling tty.  If you want to do this step in the
  42. background in the future, automate it using Expect!)
  43.  
  44. Edit the Makefile and change any definitions as appropriate for your
  45. site.  All the definitions you are likely to want to change are
  46. clearly identified and described at the beginning of the file.
  47.  
  48. To build only the stand-alone Expect program, run "make expect".  This
  49. is appropriate if you still haven't decided whether to install Expect,
  50. are still curious about it, and want to do the minimum possible in
  51. order to experiment with it.  
  52.  
  53. To build everything, run "make".  If "configure" found Tk and X on
  54. your system, this will build "expectk" (Expect with Tk) as well as the
  55. library for embedding Expect with Tk (libexptk.a) in your own
  56. programs.
  57.  
  58. At this point, you can cd to the example directory and try out some of
  59. the examples (see the README file in the example directory).
  60.  
  61. "make install" will install Expect and optionally Expectk and the
  62. libraries if you have built them.
  63.  
  64. A handful of people running "pure" 4.2BSD systems have noted that
  65. expect fails to link due to lack of getopt and vprintf.  You can get
  66. these from uunet or any good archive site.
  67.  
  68. --------------------
  69. Sophisticated Installations
  70. --------------------
  71.  
  72. The following instructions provide some suggestions for handling
  73. complex installations.
  74.  
  75. --------------------
  76. Changing Defaults
  77. --------------------
  78.  
  79. Some of the defaults in "configure" can be overridden by environment
  80. variables.  This is a convenience intended for environments that are
  81. likely to affect any program that you configure and install.
  82.  
  83. As it runs, configure describes what it is checking.  If you would
  84. like to see what configure decides, use the --verbose flag.
  85.  
  86.     configure --verbose
  87.  
  88. The following environment variables are supported.  If you use these,
  89. consider adding them to your .login file so that other installation
  90. scripts can make use of them.
  91.  
  92. CC        C compiler program.
  93.         Default is `cc', or `gcc' if `gcc' is in your PATH.
  94. X11HDIR        Directory containing X11 .h files.
  95. X11LIBS        Directory containing X11 libraries.
  96.  
  97. These settings can also be given on the command line.  For example,
  98. you could tell configure about a particular C compiler from a
  99. Bourne-compatible shell as follows:
  100.  
  101.     CC='gcc -traditional' DEFS=-D_POSIX_SOURCE
  102.  
  103. Configure assumes that the Tcl source directory can be found in the
  104. parent directory of Expect.  Create a symbolic link in Expect's parent
  105. directory to where the Tcl directory is.  By default, configure uses
  106. the latest release of Tcl that it can find.  You can override this by
  107. creating a symbolic link of "tcl" which points to the release you
  108. want.  This all holds true for Tk as well.
  109.  
  110. If you can't or don't want to create symbolic links, perhaps because
  111. of permission problems, you can instead indicate where Tcl and Tk are
  112. by using the following environment variables.
  113.  
  114. with_tclinclude        Directory containing Tcl include files
  115. with_tcllib        Directory containing Tcl library
  116. with_tkinclude        Directory containing Tk include files
  117. with_tklib        Directory containing Tk library
  118.  
  119. --------------------
  120. Multiple-Architecture Installation
  121. --------------------
  122.  
  123. You might want to compile a software package in a different directory
  124. from the one that contains the source code.  Doing this allows you to
  125. compile the package for several architectures simultaneously from the
  126. same copy of the source code and keep multiple sets of object files on
  127. disk.
  128.  
  129. To compile the package in a different directory from the one
  130. containing the source code, you must use a version of make that
  131. supports the VPATH variable.  GNU make and most other recent make
  132. programs can do this.
  133.  
  134. cd to the directory where you want the object files and executables to
  135. go and run configure.  configure automatically checks for the source
  136. code in the directory that configure is in and in ..  If configure
  137. reports that it cannot find the source code, run configure with the
  138. option --srcdir=dir, where dir is the directory that contains the
  139. source code.
  140.  
  141. You can save some disk space by installing architecture-independent
  142. files (e.g., scripts, include files) in a different place than
  143. architecture-dependent files (e.g., binaries, libraries).  To do this,
  144. edit the Makefile after configure builds it, or have configure create
  145. the Makefile with the right definitions in the first place.  To have
  146. configure do it, use the following options to configure:
  147.  
  148.     --prefix=indep
  149.     --exec-prefix=dep
  150.  
  151. where dep is the root of the tree in which to store
  152. architecture-dependent files and indep is the root in which to
  153. store -dependent files.  For example, you might invoke configure this
  154. way:
  155.  
  156.     configure --prefix=/usr/local/bin --exec-prefix=/usr/local/bin/arch
  157.  
  158. --------------------
  159. Test Suite
  160. --------------------
  161.  
  162. Patterned after the Tcl test suite, I have begun building a test suite
  163. in the subdirectory "test".  It is still incomplete however you may
  164. use by typing "make test" in this directory.  You should then see a
  165. printout of the test files processed.  If any errors occur, you'll see
  166. a much more substantial printout for each error.  See the README file
  167. in the "tests" directory for more information on the test suite.
  168.  
  169. Note that the test suite assumes the existence of certain programs to
  170. use as interactive programs.  If you are missing these or they behave
  171. differently, errors may be reported.  Similarly, the test suite
  172. assumes certain other things about your system, such as the sane stty
  173. parameters.
  174.  
  175. You may also try some of the programs distribute in the example
  176. directory (see the README file in the example directory).  They are a
  177. strong indication of whether Expect works or not.  If you have any
  178. problems with them, let me know.
  179.  
  180. --------------------
  181. Uninstalling
  182. --------------------
  183.  
  184. "make uninstall" removes all the files that "make install" creates
  185. (excluding those in the current directory).
  186.  
  187. --------------------
  188. Cleaning Up
  189. --------------------
  190.  
  191. Several "clean" targets are available to reduce space consumption of
  192. the Expect source.  The two most useful are as follows:
  193.  
  194. "make clean" deletes all files from the current directory that were
  195. created by "make"
  196.  
  197. "make distclean" is like "make clean", but it also deletes files
  198. created by "configure"
  199.  
  200. Other targets can be found in the Makefile.  They follow the GNU
  201. Makefile conventions.
  202.  
  203.